let app = getApp();
export function disposeData() {
  const { orderFrom, jumpData } = app.globalData
  let params = jumpData
  if (orderFrom == 'qnhlapp') {
    let { AccessuserID, PackageID, CommodityID, SetmealId, SpecId, GoodsAmount, username, mobile, province, city, district, detail, from, id, orderId } = jumpData
    let data = {
      AccessuserID,
      PackageID,
      goodsId: CommodityID,
      setmealId: SetmealId,
      specId: SpecId,
      amount: GoodsAmount,
      city,
      prov: province,
      area: district,
      fullname: username,
      mobilePhone: mobile,
      address: province + city + district + detail,
      from,
      id,
      orderId
    }
    params = data
  }
  return params;
}

// 跳转上一个小程序
export function backMini(type, orderId, token) {
  const { orderFrom } = app.globalData
    my.navigateBackMiniProgram({
      extraData: {
        "from": orderFrom,
        "orderId": orderId,
        "backIsvType": type,
        'token': token
      },
      success: (res) => {},
      fail: (res) => {}
    });
}